﻿@model IEnumerable<MvcWesbNews.Models.DetailNew>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            GroupNew
        </th>
        <th>
            Title
        </th>
        <th>
            Shortcut
        </th>
        <th>
            Picture
        </th>
        <th>
            Body
        </th>
        <th>
            CreateDate
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.GroupNew.Caption)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Shortcut)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Picture)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Body)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreateDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.NewsID }) |
            @Html.ActionLink("Details", "Details", new { id=item.NewsID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.NewsID })
        </td>
    </tr>
}

</table>
